const mongoose = require('mongoose')
const MongoClient = require('../db')

// 创建schema
const adminUserSchema = new mongoose.Schema({
    userName: { type: String, required: true }, //姓名   
    password: { type: String, required: true }, //密码
    avatar: { type: String }, //头像
    date: { type: Date, default: Date.now }, //注册时间
    idNumber: { type: String, required: true }, //身份证号
    phoneNumber: { type: String, required: true }, //联系方式
    vxNumber: { type: String }, //微信号
    qqNumber: { type: String } //qq号
})

// 定义数据表模型
const userLists = MongoClient.model('userInfos', adminUserSchema)
module.exports = {
    userLists
}